<?php

//GET intro INFO
function get_intro_info($name_link=''){

  global $db;
if($name_link=='')
  $intro_info = $db->query_first("SELECT * FROM introduce WHERE lang='".$_SESSION["lang"]."' Order By id");
else
  $intro_info = $db->query_first("SELECT * FROM introduce WHERE title_link='$name_link'");
  return $intro_info;
}
//GET ALL intro PAGE
function get_all_intro()
{
	global $db,$CONFIG;	
	return $db->query("SELECT * FROM introduce WHERE lang='".$_SESSION["lang"]."' ORDER BY id");

}
//GET ALL intro PAGE
function get_other_intro($not_id)
{

	global $db,$CONFIG;
	
	$intro = $db->query("SELECT * FROM introduce WHERE id != ".intval($not_id)." ORDER BY id DESC LIMIT 0,".$CONFIG['rows_other_intro']);
	
	return $intro;

}
function getProject_orderByView() {

    global $db;

    $result = $db->query("
        SELECT
        id,
        title,
        title_link,
        thumb
        FROM projects WHERE lang='".$_SESSION["lang"]."' ORDER BY view_count desc LIMIT 5");

    if($result) {
        return $result;
    }
}
?>
